<%@page import="net.sf.json.JSONObject"%>
<%@page import="java.io.InputStreamReader"%>
<%@page import="java.io.BufferedReader"%>
<%@page import="java.util.Iterator"%>
<%@page import="java.util.List"%>
<%@page import="org.jdom.Element"%>
<%@page import="org.jdom.Document"%>
<%@page import="org.jdom.input.SAXBuilder"%>
<%@page import="java.io.InputStream"%>
<%@page import="java.util.HashMap"%>
<%@page import="java.util.Map"%>
<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%
	InputStream in = request.getInputStream();
	BufferedReader bf = new BufferedReader(new InputStreamReader(in));
	String l = null;
	StringBuffer sb = new StringBuffer();
	while((l=bf.readLine())!=null){
		sb.append(l);
	}
	JSONObject j = JSONObject.fromObject(sb.toString());
	System.out.println(j.toString());
	/* Map<String, String> params = new HashMap<String, String>();
	try {
		InputStream in = request.getInputStream();
	
		SAXBuilder saxb = new SAXBuilder();
		Document doc = saxb.build(in);
		Element root = doc.getRootElement();
	
		// Map<String, String> params = new HashMap<String, String>();
		List list = root.getChildren();
		String log = "[";
		for (Iterator it = list.iterator(); it.hasNext();) {
			Element elt = (Element) it.next();
			params.put(elt.getName(), elt.getText());
			if (log.length() > 1) {
				log += ";";
			}
			log += elt.getName() + ":" + elt.getText();
		}
		log += "]";
		System.out.println("mmiap: " + log);
	} catch (Exception ex) {
		System.out.println("mmiap err:" + ex.getMessage());
		// return;
	} */
%>